package com.ibangnuo.manage.dao.employee;

import com.ibangnuo.framework.domain.Agent;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author:ly
 * @Data:2019/12/27 17:23
 * @Verdion:1.0
 */
public interface AgentRepository extends JpaRepository<Agent,String> {
    Agent findByUserId(String userId);

    void deleteByUserId(String id);

    List<Agent> findByParentIdAndIsDelete(String id1, int delete);

    Long countAgentByParentIdAndIsDelete(String parentId,int isDelete);

    List<Agent> findByIsDelete(int isDelete);

    List<Agent> findByHierarchyAndIsDelete(String hierarchy,int isDelete);

}
